Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Handling Keyboard Focus /


ReverseKeyboardFocus

NEW WITH THE APPEARANCE MANAGER

Reverses the progression of keyboard focus, returning focus to the previous control to receive keyboard focus in the window.

pascal OSErr ReverseKeyboardFocus (WindowPtr inWindow);
inWindow
On input, a pointer to the window for which you wish to reverse keyboard focus.
function result
A result code; see "Result Codes". The result code errNoRootControl indicates that keyboard focus is unavailable because the window does not have an embedding hierarchy established.
DISCUSSION
The ReverseKeyboardFocus function skips over deactivated and hidden controls until it finds the previous control to receive keyboard focus in the window.

When ReverseKeyboardFocus is called, the Control Manager calls your control definition function and passes kControlMsgFocus in its message parameter and kControlFocusPrevPart in its param parameter. In response to this message, your control definition function should change keyboard focus to its previous part, the entire control, or remove keyboard focus from the control, depending upon the circumstances. See "Handling Keyboard Focus" for a discussion of possible responses to this message.

SEE ALSO
AdvanceKeyboardFocus.

"Handling Keyboard Focus".

"Appearance Manager Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998